package org.dromara.book.domain.bo;

import org.dromara.book.domain.SzlyBaseBookType;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 图书分类业务对象 szly_base_book_type
 *
 * @author LionLi
 * @date 2024-03-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SzlyBaseBookType.class, reverseConvertGenerate = false)
public class SzlyBaseBookTypeBo extends BaseEntity {

    /**
     * 序号
     */
    @NotNull(message = "序号不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 分类号
     */
    @NotBlank(message = "分类号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String code;

    /**
     * 分类名
     */
    @NotBlank(message = "分类名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    private Long parentId;

    /**
     * 排序
     */
    @NotNull(message = "排序不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long sort;


}
